# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=mkinitcpio-archiso
pkgver=68
_commit=2ac885187f6dc610254c2fd1a6bb8e13f6e739fa  #refs/tags/v68
pkgrel=1
pkgdesc="Initcpio scripts used by archiso"
arch=(any)
url="https://gitlab.archlinux.org/mkinitcpio/mkinitcpio-archiso"
license=(GPL3)
depends=(bash device-mapper mkinitcpio)
makedepends=(git)
checkdepends=(shellcheck shfmt)
optdepends=(
  'curl: for PXE over HTTP'
  'gnupg: for PGP signature verification of rootfs over PXE'
  'mkinitcpio-nfs-utils: for PXE over NFS'
  'nbd: for PXE over NBD'
  'openssl: for CMS signature verification of rootfs over PXE'
  'pv: for status display during copy to RAM'
)
source=(git+https://gitlab.archlinux.org/mkinitcpio/$pkgname.git#tag=$_commit?signed)
sha256sums=('SKIP')
validpgpkeys=(
  '991F6E3F0765CF6295888586139B09DA5BF0D338'  # David Runge <dvzrv@archlinux.org>
  'BB8E6F1B81CF0BB301D74D1CBF425A01E68B38EF'  # nl6720 <nl6720@archlinux.org>
)

check() {
  make -k check -C $pkgname
}

package() {
  make DESTDIR="$pkgdir/" PREFIX=/usr install -C $pkgname
}
